#ifndef ANGELSCRIPT_FUNCTION_EXTENSION_HPP
#define ANGELSCRIPT_FUNCTION_EXTENSION_HPP

#include "angelscript_base.hpp"
#include "scripting/scripting_api.h"

#include <string_view>

class AngelScriptFunctionExtension final : public IFunctionalScript, AngelScriptBase
{
public:
    AngelScriptFunctionExtension(std::string title, const std::string &script_path);
    ~AngelScriptFunctionExtension();
    void execute() override;
    static IScript* create(std::string title, std::string_view code, const std::string &script_path);

private:
    bool compile(const std::string_view &code);
};

#endif /* ANGELSCRIPT_FUNCTION_EXTENSION_HPP */
